<!doctype html>
<html lang="zh">

<head>
    <meta charset="utf-8">
    <title>注册</title>
    <!-- Bootstrap 5 CDN -->
    <link href="/static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>

<body class="bg-light">
    <!-- 你的 form 放这里 -->
    <div class="container mt-5">
        <div class="card shadow" style="max-width:400px;margin:auto;">
            <div class="card-body">
                <form action="" method="post" novalidate>
                    {% csrf_token %}
                    <div class="mb-3">
                        <label class="form-label" >{{ form.old_password.label }}</label>
                        {{ form.old_password }}
                        {% if form.old_password.errors %}
                        {% for error in form.old_password.errors %}
                        <div class="alert alert-danger" role="alert">
                            {{ error }}
                        </div>
                        {% endfor %}
                        {% endif %}


                    </div>
                    <div class="mb-3">
                        <label class="form-label">{{ form.new_password.label }}</label>
                        {{ form.new_password }}
                        {% if form.new_password.errors %}
                        {% for error in form.new_password.errors %}
                        <div class="alert alert-danger" role="alert">
                            {{ error }}
                        </div>
                        {% endfor %}
                        {% endif %}

                    </div>
                    <div class="mb-3">
                        <label class="form-label">{{ form.confirm_password.label }}</label>
                        {{ form.confirm_password }}
                        {% if form.confirm_password.errors %}
                        {% for error in form.confirm_password.errors %}
                        <div class="alert alert-danger" role="alert">
                            {{ error }}
                        </div>

                        {% endfor %}
                        {% endif %}
                    </div>
                    <button type="submit" class="btn btn-primary w-100">修改</button>
                    <br>
                    <br>
                    <br>
                    <a href="/" class="btn btn-primary w-100">返回首页</a>



                </form>
            </div>
        </div>
    </div>

    <!-- Bootstrap 5 JS（可选，若需要交互组件） -->
    <script src="/static/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>

</html>